//
//  Header.h
//  XUtils
//
//  Created by anmin on 2017/6/30.
//  Copyright © 2017年 puhui. All rights reserved.
//

//#pragma mark - Log

#ifdef DEBUG

#define NSLog(FORMAT, ...) fprintf(stderr,"\nfunction:%s line:%d content:%s\n", __FUNCTION__, __LINE__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);

#define XUtilNSLog(FORMAT, ...) \
{\
/*begin log*/\
fprintf(stderr, "=============================================\r");\
/*SYSTEM_INFO : time and project*/\
fprintf(stderr, "__SYSTEM_INFO__  :    ||\t");\
NSLog(@" ");\
/*FILE_INFO : file name*/\
fprintf(stderr, "___FILE_INFO___  :    ||\t%s:%d\r",[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__);\
/*FUNC_INFO : function name*/\
fprintf(stderr, "___FUNC_INFO___  :    ||\t%s\r",__PRETTY_FUNCTION__);\
/*VA_ARGS_INFO : VA_ARGS_INFO*/\
fprintf(stderr, "__VA_ARGS_INFO__ :    ||\r");\
fprintf(stderr, "\r__BEGIN_PRINT__\r\r");\
fprintf(stderr, "%s\r",[[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);\
fprintf(stderr, "\r__END_PRINT__\r");\
fprintf(stderr, "=============================================\n");\
fprintf(stderr, "\r");\
/*end log*/\
}
#else
#define XUtilNSLog(FORMAT, ...) nil
#define NSLog(FORMAT, ...) nil
#endif


